package com.tencreat.domain.pt;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.time.LocalDateTime;

import com.tencreat.common.core.domain.BaseEntity;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tencreat.common.annotation.Excel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;


/**
 * 活动详情对象 mall_pt
 *
 * @author tencreat
 * @date 2021-11-23
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
@TableName("mall_pt")
public class MallPt extends BaseEntity<MallPt> {
    private static final long serialVersionUID = 1L;


    /**
     * 活动详情编号
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 拼团活动编号
     */
    @Excel(name = "拼团活动编号")
    @ApiModelProperty(value = "拼团活动编号")
    @TableField("`pt_sn`")
    private String ptSn;

    @Excel(name = "拼团活动编号自增值")
    @ApiModelProperty(value = "拼团活动编号自增值")
    @TableField("`sn_incrementing`")
    private Integer snIncrementing;

    /**
     * 拼团商品id
     */
    @Excel(name = "拼团商品id")
    @ApiModelProperty(value = "拼团商品id")
    @TableField("`pt_goods_id`")
    private Long ptGoodsId;


    /**
     * 参与人数
     */
    @Excel(name = "参与人数")
    @ApiModelProperty(value = "参与人数")
    @TableField("`pt_number_p`")
    private Long ptNumberP;

    /**
     * 实际参与人数
     */
    @Excel(name = "实际参与人数")
    @ApiModelProperty(value = "实际参与人数")
    @TableField("`actual_join_number`")
    private Long actualJoinNumber;

    /**
     * 拼团开启时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "拼团开启时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("`start_group_time`")
    private LocalDateTime startGroupTime;


    /**
     * 拼团结束时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "拼团结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("`end_group_time`")
    private LocalDateTime endGroupTime;


    /**
     * 开奖时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "开奖时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("`draw_time`")
    private LocalDateTime drawTime;


    /**
     * 开奖状态
     */
    // 1待开奖/2进行中/3已结束
    @Excel(name = "开奖状态")
    @ApiModelProperty(value = "开奖状态  1待开奖/2进行中/3已结束")
    @TableField("`lottery_status`")
    private Integer lotteryStatus;


    @ApiModelProperty(value = "是否是最近 0否 1是")
    @TableField("`is_late`")
    private Boolean isLate;

    /**
     * 期数
     */
    @Excel(name = "期数")
    @ApiModelProperty(value = "期数")
    @TableField("`number_of_periods`")
    private Integer numberOfPeriods;

    /**
     * 是否已开启下一期  0未开启,1开启
     */
    @Excel(name = "是否已开启下一期")
    @ApiModelProperty(value = "是否已开启下一期 0未开启,1开启")
    @TableField("`started_next`")
    private String startedNext;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    @TableLogic
    @TableField("`del_flag`")
    private String delFlag;


    /**
     * 租户ID
     */
    @Excel(name = "租户ID")
    @ApiModelProperty(value = "租户ID")
    @TableField("`tenant_id`")
    private Long tenantId;


}
